home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 47.7z / BS1 part 47 / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].7z / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].adf / piarc.lzh.parta / animwr3.rexx < prev    next >
OS/2 REXX Batch file  |  1994-03-17  |  2KB  |  63 lines

  1. /*
  2.    This phase gets the params from ram: files and calls the anim delta
  3.    append thing
  4.  */
  5.  
  6. parse arg thisframe totframes '"' framefile '"'
  7.  
  8. /*
  9.  * open rexxsupport.library -- needed for some functions
  10.  */
  11. if ~show('L',"rexxsupport.library") then do
  12.   if addlib('rexxsupport.library',0,-30,0) then do
  13.       /* everything's ok */
  14.     end;
  15.   else do
  16.     say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
  17.     say 'Cannot operate animr.rexx without this library - sorry!';
  18.     exit 10;
  19.     end;
  20.   end;
  21.  
  22. prtnme = 'IP_Port'; /* assume Image Professional */
  23. if show('P','IP_Port') = 0 then do
  24.   if show('P','IM_Port') = 0 then do
  25.     say "Can't find image processor's ARexx port!!!"; /* not running? */
  26.     say "This script requires IP, IM or IM F/c to run!";
  27.     exit(20);
  28.     end;
  29.   else do
  30.     prtnme = 'IM_Port'; /* That's the thing about assumptions... */
  31.     end;                 /* We make em, user's break em.          */
  32.   end;
  33.  
  34. options;
  35. address;
  36.  
  37.   prevpath = 'ram:'; /* put user in ram to start with... */
  38.  
  39.   call open(fhandle,'ram:IP_ANIMWR.CFG','read');      /* open the file */
  40.    jiffies = readln(fhandle);
  41.    animfile = readln(fhandle);
  42.    prefs = readln(fhandle);
  43.    atype = readln(fhandle);
  44.   call close(fhandle);                     /* close the file    */
  45.  
  46.   address command 'cmpi:ANIMWR '||jiffies||' '||atype||' '||animfile||' '||framefile;
  47.   res = rc;
  48.   if res ~= 0 then do
  49.     address(prtnme);
  50.     'autoredraw 1';
  51.     'allowcancel y'
  52.     'cancel';
  53.     address;
  54.     exit 0;
  55.     end;
  56.  
  57.   address command 'c:delete >nil: '||framefile;
  58.  
  59.   address(prtnme);
  60.   'finish';
  61.   exit 0;
  62.  
  63.